#!/bin/sh

MATCH="^[[:space:]]*($|;)"

echo "==== Additional PHP 7.0 information ====" >&3
echo "" >&3
echo "++++ PHP 7.0 SAPI (php7.0query -S): ++++" >&3
/usr/sbin/php7.0query -S >&3
echo "" >&3
echo "++++ PHP 7.0 Extensions (php7.0query -M -v): ++++" >&3
/usr/sbin/php7.0query -M -v >&3
echo "" >&3

echo "++++ Configuration files: ++++" >&3
"**** /etc/php/7.0/cli/php.ini ****" >&3
grep -Ev "$MATCH" /etc/php/7.0/cli/php.ini >&3
echo "" >&3
find /etc/php/7.0/cli/conf.d/ -name '*.ini' | \
while read CONF; do
    echo "**** $CONF ****" >&3
    grep -Ev "$MATCH" "$CONF" >&3
    echo "" >&3
done
